package com.youth.orderservice.service;

import com.youth.commonutils.R;
import com.youth.orderservice.entity.OrderVo.OrderQuery;
import com.youth.orderservice.entity.TOrder;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author huangqicai
 * @since 2023-04-06
 */
public interface TOrderService extends IService<TOrder> {

    /*根据课程id和用户id去创建订单*/
    R createOrder(String courseId, String userId);

    /*根据订单id获取订单信息*/
    R getOrderById(String orderId);

    /*分页条件查询订单信息*/
    R getPageList(long current, long limit, OrderQuery orderQuery);

    /*根据订单id删除订单信息*/
    R deleteOrder(String orderId);

    /*根据订单id和订单实体类更新订单信息*/
    R updateOrder(String orderId, TOrder tOrder);
}
